import { Component, OnInit } from '@angular/core';

import { AccountService, User } from '../../../DM/account.service';
@Component({
  selector: 'app-back',
  templateUrl: './back.component.html',
  styleUrls: ['./back.component.css']
})
export class BackComponent implements OnInit {
  isCollapsed = false;
  currentUser: User = new User;

  constructor(
    private accountservice: AccountService
  ) { }

  async ngOnInit() {
    try {
      this.currentUser = await this.accountservice.getCurrentUserInfo();
    } catch (err) {
      console.error('back-component-error', err);
    }
  }
}
